{% extends "baseMenu.html" %}

{% block extrabody %} onload="initialize()" {% endblock %}

{% block extrahead %}
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
  <script type="text/javascript">
  {% block funcDblClick %}{% endblock %}
  </script>
  
  <script>
      var point = new google.maps.LatLng(37.78333309725631,-122.44983673095703);
      var markerPosition = new google.maps.LatLng(37.78333309725631,-122.44983673095703);
      var markerImageBus = "http://google-maps-icons.googlecode.com/files/bus.png";
      var markerImage = "http://thydzik.com/thydzikGoogleMap/markerlink.php?color=5680FC";
      var markerImage2 = "http://thydzik.com/thydzikGoogleMap/markerlink.php?color=61380B";
      var markerImage3 = "http://thydzik.com/thydzikGoogleMap/markerlink.php?color=3ADF00";
      var markerImageSelected = "http://thydzik.com/thydzikGoogleMap/markerlink.php?color=FF0000";
      var marker;
      var map;
      var limits = new google.maps.LatLngBounds();
      var infoWindow = new google.maps.InfoWindow({ content: "",
    	          			size: new google.maps.Size(50,50)
    	        	    })

      function initialize() {
        var mapOptions = {
          zoom: 13,
          mapTypeId: google.maps.MapTypeId.ROADMAP,
          center: point,
          zoomControl: true,
          panControl: true,
          mapTypeControl: false,
          scaleControl: true,
          streetViewControl: false,
          overviewMapControl: true
        };

        map = new google.maps.Map(document.getElementById('mapas'),
                mapOptions);
        
        {% block marcas %}{% endblock %}
        
        google.maps.event.addListener(map, 'click', function(event) {
      	  	{% block defFuncDblClick %}{% endblock %}
     	});
        map.fitBounds(limits);
      }
      
      function toggleBounce() {
	      if (markerSelected.getAnimation() != null) {
	    	  markerSelected.setAnimation(null);
       	  } 
	      else {
	    	  markerSelected.setAnimation(google.maps.Animation.BOUNCE);
          }
      }

      function closeInfoWindow() {
          infoWindow.open();
      }

      function centrarMapa(lat,lon) {
    	  map.setCenter(new google.maps.LatLng(lat,lon));
  	      map.panTo(new google.maps.LatLng(lat,lon));
      }
    </script>
	{% block extraScripts %}{% endblock %}
{% endblock %}

{% block content %}
{% block extras %}{% endblock %}
{% endblock %}